[codex] complete controlled widget state behavior#33
Conversation
zcourts
left a comment
There was a problem hiding this comment.
Requesting changes before this can be merged.
There are a few architectural/behavioral issues in this patch:
-
crates/core/fission-core/src/input/text.rschanges the genericTextInputControllerso anyTextInputType::Numberserializes change payloads asf32. That makes the generic text controller infer action payload type from keyboard semantics, which is too broad. A numeric keyboard hint should not silently change the type contract for every text input using it. The typed conversion should live inNumberInputor in an explicitly typed action path. -
Several editor example actions change from explicit serialization failure to
.unwrap_or_default(). That silently dispatches an empty/default payload if serialization fails. We should not merge silent fallback behavior into action dispatch paths. Either keep the failure explicit, or use a typed helper/macro path that makes the envelope construction reliable without swallowing errors. -
The hit-test/paint-blocking work needs runtime-level coverage around actual dispatch behavior. The unit tests prove raw hit-test IDs, but this patch changes how paint nodes can block backdrop interactions, so it should also prove that the intended backdrop/action dispatch still reaches the right semantic owner.
-
CircularProgressindeterminate animation appears to require an explicitid. If that is the intended contract, document it and add a test. If not, the widget should provide a stable identity path or fail loudly instead of silently rendering non-animated.
I did not merge this because it is draft and the above needs to be addressed against current main.
5ad9660 to
6f9d9f3
Compare
6f9d9f3 to
f33c225
Compare
Summary
Completes several controlled widget state behaviors and removes serialization panic paths in example widget actions.
Why
These widgets exposed controlled state fields but had incomplete behavior for common interactions. Some example action payload creation also used infallible serialization assumptions.
Impact
Applications can now drive DatePicker navigation explicitly, NumberInput text edits can update numeric state, and modal surfaces trap focus more consistently.
Validation
cargo check -p fission-widgets --lib --locked --offlinecargo test -p fission-core --test input_controller_tests test_number_input_type_filters_ime_commit --locked --offline --quiet -- --nocapturecargo check -p inbox --locked --offlinecargo check -p fission-editor --locked --offline